import { http } from "@/utils/myRequest"
import type { UserIndividualType } from "@/types/userInfo"
// 获取个人信息
export const getIndividualApi = () => {
  return http<UserIndividualType>({
    url: '/v1_0/user/profile'
  })
}
// 修改图片
export const updatePhotolApi = (data: FormData) => {
  return http<{photo: string}>({
    url: '/v1_0/user/photo',
    method: 'PATCH',
    data
  })
}

// 修改个人信息
export const updateIndividualApi = (data: UserIndividualType) => {
  return http<UserIndividualType>({
    url: '/v1_0/user/profile',
    method: 'PATCH',
    data: {
      real_name: '我叫靓仔',
      ...data
    }
  })
}